package com.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import com.dao.base.BaseRepository;
import com.dao.entity.Customer;


/**
 * @author geliyang
 *
 */
@Repository
public interface ICustomerDao extends BaseRepository<Customer,Long>{

    /**
     * 登录查询
     * @param username
     * @param password
     * @return
     */
    public Customer findByAccountAndPassword(String username,String password);
    
    /**
     * 名字查询分页
     * @param username
     * @param pageable
     * @return
     */
    public Page<Customer> findByUserName(String userName, Pageable pageable);
    
    /**
     * 名字模糊查询分页
     * @param username
     * @param pageable
     * @return
     */
    public Page<Customer> findAllByUserNameLike(String username, Pageable pageable);

	public Customer findByAccount(String account);

	public Customer findByOpenId(String openId);

}
